export const tetrisArr = [
  [
    [{x: 4, y: 0, color: 'c0'}, {x: 5, y: 0, color: 'c0'}, {x: 4, y: 1, color: 'c0'}, {x: 5, y: 1, color: 'c0'}],
    [{x: 4, y: 0, color: 'c0'}, {x: 5, y: 0, color: 'c0'}, {x: 6, y: 0, color: 'c0'}, {x: 7, y: 0, color: 'c0'}],
    [{x: 4, y: 0, color: 'c0'}, {x: 4, y: 1, color: 'c0'}, {x: 4, y: 2, color: 'c0'}, {x: 4, y: 3, color: 'c0'}]
  ],
  [
    [{x: 4, y: 0, color: 'c1'}, {x: 4, y: 1, color: 'c1'}, {x: 4, y: 2, color: 'c1'}, {x: 5, y: 2, color: 'c1'}],
    [{x: 4, y: 0, color: 'c1'}, {x: 4, y: 1, color: 'c1'}, {x: 5, y: 0, color: 'c1'}, {x: 6, y: 0, color: 'c1'}],
    [{x: 4, y: 0, color: 'c1'}, {x: 5, y: 0, color: 'c1'}, {x: 5, y: 1, color: 'c1'}, {x: 5, y: 2, color: 'c1'}],
    [{x: 4, y: 1, color: 'c1'}, {x: 5, y: 1, color: 'c1'}, {x: 6, y: 1, color: 'c1'}, {x: 6, y: 0, color: 'c1'}]
  ],
  [
    [{x: 4, y: 2, color: 'c2'}, {x: 5, y: 0, color: 'c2'}, {x: 5, y: 1, color: 'c2'}, {x: 5, y: 2, color: 'c2'}],
    [{x: 4, y: 0, color: 'c2'}, {x: 4, y: 1, color: 'c2'}, {x: 5, y: 1, color: 'c2'}, {x: 6, y: 1, color: 'c2'}],
    [{x: 4, y: 0, color: 'c2'}, {x: 5, y: 0, color: 'c2'}, {x: 4, y: 1, color: 'c2'}, {x: 4, y: 2, color: 'c2'}],
    [{x: 4, y: 0, color: 'c2'}, {x: 5, y: 0, color: 'c2'}, {x: 6, y: 0, color: 'c2'}, {x: 6, y: 1, color: 'c2'}]
  ],
  [
    [{x: 4, y: 0, color: 'c3'}, {x: 5, y: 0, color: 'c3'}, {x: 5, y: 1, color: 'c3'}, {x: 6, y: 1, color: 'c3'}],
    [{x: 5, y: 0, color: 'c3'}, {x: 4, y: 1, color: 'c3'}, {x: 5, y: 1, color: 'c3'}, {x: 4, y: 2, color: 'c3'}],
    [{x: 4, y: 1, color: 'c3'}, {x: 5, y: 1, color: 'c3'}, {x: 5, y: 0, color: 'c3'}, {x: 6, y: 0, color: 'c3'}],
    [{x: 4, y: 0, color: 'c3'}, {x: 4, y: 1, color: 'c3'}, {x: 5, y: 1, color: 'c3'}, {x: 5, y: 2, color: 'c3'}]
  ],
  [
    [{x: 4, y: 0, color: 'c4'}, {x: 5, y: 0, color: 'c4'}, {x: 6, y: 0, color: 'c4'}, {x: 5, y: 1, color: 'c4'}],
    [{x: 4, y: 1, color: 'c4'}, {x: 5, y: 0, color: 'c4'}, {x: 5, y: 1, color: 'c4'}, {x: 5, y: 2, color: 'c4'}],
    [{x: 5, y: 0, color: 'c4'}, {x: 4, y: 1, color: 'c4'}, {x: 5, y: 1, color: 'c4'}, {x: 6, y: 1, color: 'c4'}],
    [{x: 5, y: 0, color: 'c4'}, {x: 5, y: 1, color: 'c4'}, {x: 5, y: 2, color: 'c4'}, {x: 6, y: 1, color: 'c4'}]
  ]
]

export function transformationBlock (x, y) {
  return [
    [
      [{x: x, y: y, color: 'c0'}, {x: x + 1, y: y, color: 'c0'}, {x: x, y: y + 1, color: 'c0'}, {x: x + 1, y: y + 1, color: 'c0'}],
      [{x: x, y: y, color: 'c0'}, {x: x + 1, y: y, color: 'c0'}, {x: x + 2, y: y, color: 'c0'}, {x: x + 3, y: y, color: 'c0'}],
      [{x: x, y: y, color: 'c0'}, {x: x, y: y + 1, color: 'c0'}, {x: x, y: y + 2, color: 'c0'}, {x: x, y: y + 3, color: 'c0'}]
    ],
    [
      [{x: x - 1, y: y - 1, color: 'c1'}, {x: x - 1, y: y, color: 'c1'}, {x: x - 1, y: y + 1, color: 'c1'}, {x: x, y: y + 1, color: 'c1'}],
      [{x: x - 1, y: y - 1, color: 'c1'}, {x: x - 1, y: y, color: 'c1'}, {x: x, y: y - 1, color: 'c1'}, {x: x + 1, y: y - 1, color: 'c1'}],
      [{x: x - 1, y: y - 1, color: 'c1'}, {x: x, y: y - 1, color: 'c1'}, {x: x, y: y, color: 'c1'}, {x: x, y: y + 1, color: 'c1'}],
      [{x: x - 1, y: y, color: 'c1'}, {x: x, y: y, color: 'c1'}, {x: x + 1, y: y, color: 'c1'}, {x: x + 1, y: y - 1, color: 'c1'}]
    ],
    [
      [{x: x - 1, y: y + 1, color: 'c2'}, {x: x, y: y - 1, color: 'c2'}, {x: x, y: y, color: 'c2'}, {x: x, y: y + 1, color: 'c2'}],
      [{x: x - 1, y: y - 1, color: 'c2'}, {x: x - 1, y: y, color: 'c2'}, {x: x, y: y, color: 'c2'}, {x: x + 1, y: y, color: 'c2'}],
      [{x: x - 1, y: y - 1, color: 'c2'}, {x: x, y: y - 1, color: 'c2'}, {x: x - 1, y: y, color: 'c2'}, {x: x - 1, y: y + 1, color: 'c2'}],
      [{x: x - 1, y: y - 1, color: 'c2'}, {x: x, y: y - 1, color: 'c2'}, {x: x + 1, y: y - 1, color: 'c2'}, {x: x + 1, y: y, color: 'c2'}]
    ],
    [
      [{x: x - 1, y: y - 1, color: 'c3'}, {x: x, y: y - 1, color: 'c3'}, {x: x, y: y, color: 'c3'}, {x: x + 1, y: y, color: 'c3'}],
      [{x: x, y: y - 1, color: 'c3'}, {x: x - 1, y: y, color: 'c3'}, {x: x, y: y, color: 'c3'}, {x: x - 1, y: y + 1, color: 'c3'}],
      [{x: x - 1, y: y, color: 'c3'}, {x: x, y: y, color: 'c3'}, {x: x, y: y - 1, color: 'c3'}, {x: x + 1, y: y - 1, color: 'c3'}],
      [{x: x - 1, y: y - 1, color: 'c3'}, {x: x - 1, y: y, color: 'c3'}, {x: x, y: y, color: 'c3'}, {x: x, y: y + 1, color: 'c3'}]
    ],
    [
      [{x: x - 1, y: y - 1, color: 'c4'}, {x: x, y: y - 1, color: 'c4'}, {x: x + 1, y: y - 1, color: 'c4'}, {x: x, y: y, color: 'c4'}],
      [{x: x - 1, y: y, color: 'c4'}, {x: x, y: y - 1, color: 'c4'}, {x: x, y: y, color: 'c4'}, {x: x, y: y + 1, color: 'c4'}],
      [{x: x, y: y - 1, color: 'c4'}, {x: x - 1, y: y, color: 'c4'}, {x: x, y: y, color: 'c4'}, {x: x + 1, y: y, color: 'c4'}],
      [{x: x - 1, y: y - 1, color: 'c4'}, {x: x - 1, y: y, color: 'c4'}, {x: x - 1, y: y + 1, color: 'c4'}, {x: x, y: y, color: 'c4'}]
    ]
  ]
}
